package com.keti.controller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.keti.Dao.ApplyPurchaseDao;
import com.keti.Dao.ApplyReceiveDao;
import com.keti.DaoImpl.ApplyPurchaseDaoImpl;
import com.keti.DaoImpl.ApplyReceiveDaoImpl;
import com.keti.pojo.ApplyPurchase;
import com.keti.pojo.ApplyReceive;

/**
 * Servlet implementation class ShowApplyPurchaseServlet
 */
@WebServlet("/ShowApplyPurchaseServlet")
public class ShowApplyPurchaseServlet extends HttpServlet {
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		ApplyPurchaseDao ard = new ApplyPurchaseDaoImpl();
		List<ApplyPurchase> list = new ArrayList<ApplyPurchase>();
		list = ard.queryAll();
		request.setAttribute("list", list);
		request.getRequestDispatcher("/jsp"
				+ "/ShowPurchaseApply.jsp").forward(request, response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
